Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add flag to CLI to disable colour coding of console output #4033

Merged
merged 5 commits into from
Aug 14, 2023

Conversation

alessandromazza98
Copy link
Contributor

Closes #4030

This PR adds a flag --log.not-coloured to the CLI to disable the colour coding of console output.

@codecov
Copy link

codecov bot commented Aug 2, 2023

Codecov Report

Merging #4033 (f918fcc) into main (b46101a) will increase coverage by 0.20%.
Report is 90 commits behind head on main.
The diff coverage is 35.71%.

Impacted file tree graph

Files Changed Coverage Δ
crates/tracing/src/lib.rs 11.11% <0.00%> (-0.21%) ⬇️
bin/reth/src/cli/mod.rs 39.44% <45.45%> (+5.04%) ⬆️

... and 125 files with indirect coverage changes

Flag Coverage Δ
integration-tests 16.84% <0.00%> (+0.28%) ⬆️
unit-tests 64.23% <35.71%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 26.07% <35.71%> (+0.23%) ⬆️
blockchain tree 82.83% <ø> (-0.22%) ⬇️
pipeline 90.07% <ø> (-0.04%) ⬇️
storage (db) 74.75% <ø> (+0.45%) ⬆️
trie 94.71% <ø> (+<0.01%) ⬆️
txpool 51.43% <ø> (+3.44%) ⬆️
networking 77.70% <ø> (+0.23%) ⬆️
rpc 58.69% <ø> (+0.43%) ⬆️
consensus 63.73% <ø> (+0.21%) ⬆️
revm 32.18% <ø> (-0.53%) ⬇️
payload builder 6.57% <ø> (-0.02%) ⬇️
primitives 87.83% <ø> (-0.16%) ⬇️


/// The flag to disable colour coding of console output.
#[arg(long = "log.not-coloured", global = true)]
not_coloured: bool,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@onbjerg you are better at naming things. Is this okay?

Copy link
Collaborator

@rakita rakita left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pending @onbjerg

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docs nit,

otherwise pending @onbjerg

bin/reth/src/cli/mod.rs Outdated Show resolved Hide resolved
@mattsse mattsse added M-changelog This change should be included in the changelog A-observability Related to tracing, metrics, logs and other observability tools A-cli Related to the reth CLI labels Aug 2, 2023
@onbjerg onbjerg changed the title add flag to CLI to disable colour coding of console output feat: add flag to CLI to disable colour coding of console output Aug 9, 2023
bin/reth/src/cli/mod.rs Outdated Show resolved Hide resolved
bin/reth/src/cli/mod.rs Outdated Show resolved Hide resolved
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ty!

@mattsse mattsse enabled auto-merge August 11, 2023 15:32
@mattsse mattsse added this pull request to the merge queue Aug 14, 2023
Merged via the queue into paradigmxyz:main with commit 4ff8bca Aug 14, 2023
23 checks passed
alessandromazza98 added a commit to alessandromazza98/reth that referenced this pull request Aug 19, 2023
…adigmxyz#4033)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
@alessandromazza98 alessandromazza98 deleted the issue4030 branch September 11, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI A-observability Related to tracing, metrics, logs and other observability tools M-changelog This change should be included in the changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Disable console color coding
4 participants